package com.koron.css2.baseConfig.mapper;

import com.koron.css2.baseConfig.bean.BusinessAbodeBean;
import com.koron.css2.baseConfig.vo.SelectVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.koron.ebs.mybatis.EnvSource;

import java.util.List;
@EnvSource("_default")
public interface BusinessAbodeMapper {
	
	/**
	 * 下拉框
	 * 
	 * @return
	 */
	List<SelectVO> businessAbodeSelect(String groupCode);
	/**
	 * 根据id查询营业所
	 * @param bean
	 * @return
	 */
	BusinessAbodeBean findBusinessAbodeById(String id);

	/**
	 * 根据name查询营业所
	 * @param bean
	 * @return
	 */
	@Select("select * from pub_business_abode where status=1 and abode_name=#{name} and group_code=#{code}")
	BusinessAbodeBean findBusinessAbodeByName(@Param("name")String name,@Param("code")String code);
}
